package com.magold.game.factory;

import com.magold.io.XMLReader;
import com.magold.logic.ISpriteLogic;
import com.magold.logic.PullSwitch;

public class PullSwitchFactory extends BaseLogicFactory {

	public PullSwitchFactory() {
		super(PullSwitch.class.getSimpleName());
	}

	@Override
	protected ISpriteLogic createSafely(XMLReader pReader) {
		float pDistance2Tab = pReader.getFloat("distance");
		boolean connecting = pReader.getBoolean("connecting");
		PullSwitch pullSwitch = new PullSwitch(pDistance2Tab, connecting);
		return pullSwitch;
	}

}
